import request from '@/utils/request'

// get 获得小组列表数据
export function getTeamInformation(params) {
  return request({
    url: '/ops/groups/list',
    method: 'get',
    params: { tenantId: params }
  })
}

// get 获得小组话题列表数据
export function getTopicInformation(params) {
  return request({
    url: '/ops/groupsTopic/list',
    method: 'get',
    params: { tenantId: params }
  })
}

// post 新增小组数据
export function addGroup(data) {
  return request({
    url: '/ops/groups/add',
    method: 'post',
    data
  })
}

// post 修改小组数据
export function updateGroup(data) {
  return request({
    url: '/ops/groups/update',
    method: 'post',
    data
  })
}

// get 获得用户数据
export function getUserByName(params) {
  return request({
    url: '/ops/user/getByName',
    method: 'get',
    params: { name: params }
  })
}

// post 修改小组话题数据
export function updateGroupTopic(data) {
  return request({
    url: '/ops/groupsTopic/update',
    method: 'post',
    data
  })
}

// get 删除小组话题数据
export function deleteGroupTopic(params) {
  return request({
    url: '/ops/groupsTopic/delGroupTopic',
    method: 'get',
    params: { id: params }
  })
}
